import {
    createRouter,
    createWebHashHistory
} from 'vue-router'

const routes = [{
        path: '/',
        component: () => import('../components/Login.vue')
    },
    {
        path:"/index",
        component: () => import('../components/Index.vue'),
        redirect:'/analyse',
        children: [
            {
                path: '/analyse',
                component: () => import('../components/Analyse.vue')
            },
            {
                path: '/userTable',
                component: () => import('../components/UserTable.vue')
            },
            {
                path: '/typeTable',
                component: () => import('../components/TypeTable.vue')
            },
            {
                path: '/bookTable',
                component: () => import('../components/BookTable.vue')
            },
            {
                path: '/scoreTable',
                component: () => import('../components/ScoreTable.vue')
            },
            {
                path: '/comment',
                component: () => import('../components/Comment.vue')
            },
            {
                path: '/error',
                component: () => import('../components/Error.vue')
            }
        ]
    },
]

const router = createRouter({
    history: createWebHashHistory(),
    routes,
})
export default router